package com.example.hrandroidapp.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.hrandroidapp.fragment.OvertimeApproveFragment;
import com.example.hrandroidapp.fragment.OvertimeMyOTFragment;
import com.example.hrandroidapp.fragment.OvertimePendingFragment;
import com.example.hrandroidapp.fragment.OvertimeRejectFragment;

public class OTTabsPagerAdapter extends FragmentPagerAdapter {
	
	public OTTabsPagerAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int index) {
		switch(index) {
		case 0: 
			return new OvertimePendingFragment();
			
		case 1:
			return new OvertimeApproveFragment();
			
		case 2:
			return new OvertimeRejectFragment();
			
		case 3:
			return new OvertimeMyOTFragment();
		}
		return null;
	}

	@Override
	public int getCount() {
		return 4;
	}

}
